package com.yanqu.road.server.cmd.activity.relation;

import com.yanqu.road.pb.cookboyactivity.CookBoyActivityProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.CrossRelationActivityMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CROSS_RELATION_ACTIVITY_RELOAD, desc = "重新加載活動")
public class CrossReloadActivityCmd extends CrossCommand {

    private int activityId;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        CookBoyActivityProto.CrossRelationActivityReloadMsg reqMsg = CookBoyActivityProto.CrossRelationActivityReloadMsg.parseFrom(packet.getBytes());
        activityId = reqMsg.getActivityId();
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        log.info("跨服重新加载小当家类型活动开始");
        CrossRelationActivityMgr.reloadActivityInfo();
        log.info("跨服重新加载小当家类型活动结束");

    }

    @Override
    public void sendData() {

    }
}
